package com.ruoyi.cs.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cs.mapper.TVipReceiveMapper;
import com.ruoyi.cs.domain.TVipReceive;
import com.ruoyi.cs.service.ITVipReceiveService;

/**
 * 用户VIP等级奖励领取记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-03-02
 */
@Service
@SuppressWarnings("all")
public class TVipReceiveServiceImpl implements ITVipReceiveService 
{
    @Autowired
    private TVipReceiveMapper tVipReceiveMapper;

    /**
     * 查询用户VIP等级奖励领取记录
     * 
     * @param id 用户VIP等级奖励领取记录主键
     * @return 用户VIP等级奖励领取记录
     */
    @Override
    public TVipReceive selectTVipReceiveById(Long id)
    {
        return tVipReceiveMapper.selectTVipReceiveById(id);
    }

    /**
     * 查询用户VIP等级奖励领取记录列表
     * 
     * @param tVipReceive 用户VIP等级奖励领取记录
     * @return 用户VIP等级奖励领取记录
     */
    @Override
    public List<TVipReceive> selectTVipReceiveList(TVipReceive tVipReceive)
    {
        return tVipReceiveMapper.selectTVipReceiveList(tVipReceive);
    }

    /**
     * 新增用户VIP等级奖励领取记录
     * 
     * @param tVipReceive 用户VIP等级奖励领取记录
     * @return 结果
     */
    @Override
    public int insertTVipReceive(TVipReceive tVipReceive)
    {
        tVipReceive.setCreateTime(DateUtils.getNowDate());
        return tVipReceiveMapper.insertTVipReceive(tVipReceive);
    }

    /**
     * 修改用户VIP等级奖励领取记录
     * 
     * @param tVipReceive 用户VIP等级奖励领取记录
     * @return 结果
     */
    @Override
    public int updateTVipReceive(TVipReceive tVipReceive)
    {
        return tVipReceiveMapper.updateTVipReceive(tVipReceive);
    }

    /**
     * 批量删除用户VIP等级奖励领取记录
     * 
     * @param ids 需要删除的用户VIP等级奖励领取记录主键
     * @return 结果
     */
    @Override
    public int deleteTVipReceiveByIds(Long[] ids)
    {
        return tVipReceiveMapper.deleteTVipReceiveByIds(ids);
    }

    /**
     * 删除用户VIP等级奖励领取记录信息
     * 
     * @param id 用户VIP等级奖励领取记录主键
     * @return 结果
     */
    @Override
    public int deleteTVipReceiveById(Long id)
    {
        return tVipReceiveMapper.deleteTVipReceiveById(id);
    }
}
